<?php $type = $this->security->xss_clean($this->uri->segment(5));?>
<div id="main-content">
    <div class="container">
    	<div class="row">
    		<div id="content" class="col-lg-12">
    			<!-- PAGE HEADER-->
                    <div class="row">
							<div class="col-sm-12">
								<div class="page-header">
									<div class="clearfix">
										<h3 class="content-title pull-left">Quản lí <?php if($type == 'giaovien') { echo 'Giáo Viên'; } else {echo 'Học sinh'; }?></h3>
									</div>
								</div>
							</div>
					</div>
                    <!-- DATA TABLES -->
						<div class="row">
							<div class="col-md-12">
								<!-- BOX -->
								<div class="box border green">
									<div class="box-title">
										<h4><i class="fa fa-table"></i>Danh sách</h4>
										<div class="tools hidden-xs">
											<a href="javascript:;" data-toggle="tooltip" title="Ẩn đi" class="collapse">
												<i class="fa fa-chevron-up"></i>
											</a>
										</div>
									</div>
									<div class="box-body">
                                    <?php if(!empty($data)): ?>
										<table id="datatable1" cellpadding="0" cellspacing="0" border="0" class="datatable table table-striped table-bordered table-hover">
											<thead>
												<tr>
                                                    <th>STT</th>
													<th class="center">Name</th>
                                                    <th class="center">Phone</th>
                                                    <th class="center">Email</th>
													<th class="center hidden-xs">Ngày tạo</th>
													<th class="center">Sửa</th>
													<th class="center">Xóa</th>
												</tr>
											</thead>
											<tbody>
                                            <?php $i=0; foreach ($data as $data) : $i++; ?>
												<tr class="gradeX">
													<td><?php echo $i;  ?></td>
													<td class="center"><?php echo $data->name;  ?></td>
                                                    <td class="center"><?php echo $data->phone;  ?></td>
                                                    <td class="center"><?php echo $data->email;  ?></td>
													<td class="center hidden-xs"><?php echo $data->created;  ?></td>
													<td class="center"><a href="<?php echo base_url().'admin/xuly/users/edit/'.$data->id?>"><i class="fa fa-edit fa-2x"></i></a></td>
                                                    <td class="center"><a onclick="return confirm('Bạn có muốn xóa không?');" href="<?php echo base_url().'admin/xuly/users/xoa/'.$data->id.'/'.$this->uri->segment(5)?>"><i class="fa fa-trash-o fa-2x red"></td>
												</tr>
                                                <?php endforeach; ?>
											</tbody>
										</table>
                                        <?php endif; ?>
                                        <a href="<?php echo base_url().'admin/xuly/users/edit'; ?>" title="Thêm mới" class="btn btn-success"><i class="fa fa-angle-double-right"></i>&nbsp;&nbsp;&nbsp;Thêm mới</a>
		                                <div class="row">
                                               <div class="col-sm-12">
                                                  <div class="pull-right">
                                                           <?php echo $this->pagination->create_links();?>
                                                  </div>
                                                  <div class="clearfix"></div>
                                               </div>
                                            </div>
                                    </div>
								</div>
								<!-- /BOX -->
							</div>
						</div>
						<!-- /DATA TABLES -->
    			</div>
    			<!-- /PAGE HEADER -->
    		</div>
    	</div>
    </div>
</div>